import request from '@/utils/request'

// 查询客户回款列表
export function listBack(query) {
  return request({
    url: '/custom/back/list',
    method: 'get',
    params: query
  })
}

// 查询业务员佣金金额排行
export function listRateMoneyBack(query) {
  return request({
    url: '/custom/back/getRateMoney',
    method: 'get',
    params: query
  })
}

export function listDeptRateMoney(query) {
  return request({
    url: '/custom/back/getDeptRateMoney',
    method: 'get',
    params: query
  })
}


// 查询客户回款详细
export function getBack(id) {
  return request({
    url: '/custom/back/' + id,
    method: 'get'
  })
}

// 新增客户回款
export function addBack(data) {
  return request({
    url: '/custom/back',
    method: 'post',
    data: data
  })
}

// 修改客户回款
export function updateBack(data) {
  return request({
    url: '/custom/back',
    method: 'put',
    data: data
  })
}

// 删除客户回款
export function delBack(id) {
  return request({
    url: '/custom/back/' + id,
    method: 'delete'
  })
}
